import { alovaInstance } from './apiClient'
import type { TaskGroup } from '../types/group'

// 创建任务分组
export const createTaskGroup = (data: { name: string }) => {
  return alovaInstance.Post('/task-groups', data)
}

// 获取任务分组列表
export const getTaskGroups = () => {
  return alovaInstance.Get('/task-groups')
}

// 更新任务分组
export const updateTaskGroup = (groupId: number, data: { name: string }) => {
  return alovaInstance.Put(`/task-groups/${groupId}`, data)
}

// 删除任务分组
export const deleteTaskGroup = (groupId: number) => {
  return alovaInstance.Delete(`/task-groups/${groupId}`)
}